<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>样式的绑定</title>
    <style>
        .atguigu {
            border: 1px solid black;
        }

        .demo1 {
            background-color: skyblue;
        }

        .demo2 {
            color: rgb(214, 2, 2);
        }

        .demo3 {
            text-shadow: 2px 2px 2px yellow;
        }
    </style>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <!-- 准备好一个容器-->
    <div id="root">
        <h1 class="atguigu"  :class="[t1,t2,t3]">你好</h1>


        <h1 class="atguigu"  :class="{demo1:hasD1,demo2:hasD2}">你好</h1>
    </div>
</body>
<script type="text/javascript">
    Vue.config.productionTip = false
    new Vue({
        el: '#root',
        data: {
            hasD1: true,
            hasD2: true,
            t1: 'demo1',
            t2: 'demo2',
            t3: 'demo3',
            fontSize: '40px'
        }
    })
</script>

</html>